from django.db import models
from django.utils import timezone
# Create your models here.
class Base(models.Model):
    # 创建时间
    create_time = models.DateTimeField(default=timezone.now, null=True)

    class Meta:
        abstract = True
#评论表
class MyroadComment(Base):
    uid = models.IntegerField(null=True)
    content = models.CharField(max_length=200,null=True)
    username=models.CharField(max_length=20,null=True)
    gid=models.IntegerField(null=True)
    num=models.IntegerField(null=True)
    class Meta:
        db_table='myroadcomment'

class MyroadUser(models.Model):
    uid = models.IntegerField(null=True)
    username = models.CharField(max_length=50, null=True)
    password = models.CharField(max_length=15, null=True)

    class Meta:
        db_table = 'myroaduser'


# 订单表
class MyroadIndent(models.Model):
    uid = models.IntegerField(null=True)
    title = models.CharField(max_length=100, null=True)
    price = models.IntegerField(null=True)
    username = models.CharField(max_length=50, null=True)
    phone = models.CharField(max_length=15, null=True)
    img = models.CharField(max_length=200, null=True)

    class Meta:
        db_table = 'myroadindent'
